﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="News.aspx.cs" Inherits="TuoiThoProject.Admin.News" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../Scripts/jquery-1.7.1.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-ui-1.8.20.custom.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            $("#edit-dialog").dialog({
                autoOpen: false,
                height: 500,
                width: 600,
                modal: true,
                buttons: {
                    Lưu: function () { $(this).dialog("close"); },
                    Thôi: function () { $(this).dialog("close"); }
                }
            });

            $("#delete-dialog").dialog({
                autoOpen: false,
                height: 200,
                width: 300,
                modal: true,
                buttons: {
                    "Chắc chắn": function () { $(this).dialog("close"); },
                    "Không": function () { $(this).dialog("close"); }
                }
            });

            $(".btnEdit").each(function () {
                $(this).click(function () {
                    $("#edit-dialog").dialog("open");
                });
            });

            $(".btnDelete").each(function () {
                $(this).click(function () {
                    $("#delete-dialog").dialog("open");
                });
            });
        })
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="width: 100%;" class="tblNews">
        <tr>
            <th>
                Id
            </th>
            <th>
                Tiêu đề tin
            </th>
            <th>
                Ngày tạo
            </th>
            <th>
                Ngày xuất bản
            </th>
            <th>
                Chỉnh sửa
            </th>
        </tr>
        <tr align="center">
            <td>
                1
            </td>
            <td>
                Bé Lộc nhận phiếu bé ngoan
            </td>
            <td>
                19/05/2012
            </td>
            <td>
                25/05/2012
            </td>
            <td>
                <table>
                    <tr>
                        <td>
                            <input id="btnEdit" class="btnEdit" type="button" value="Sửa" />
                        </td>
                        <td>
                            <input id="btnDelete" class="btnDelete" type="button" value="Xóa" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr align="center">
            <td>
                2
            </td>
            <td>
                Bé Lộc lười ăn
            </td>
            <td>
                19/05/2012
            </td>
            <td>
                25/05/2012
            </td>
            <td>
                <table>
                    <tr>
                        <td>
                            <input id="btnEdit" class="btnEdit" type="button" value="Sửa" />
                        </td>
                        <td>
                            <input id="btnDelete" class="btnDelete" type="button" value="Xóa" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr align="center">
            <td>
                3
            </td>
            <td>
                Bé Lộc nghịch bẩn
            </td>
            <td>
                19/05/2012
            </td>
            <td>
                25/05/2012
            </td>
            <td>
                <table>
                    <tr>
                        <td>
                            <input id="btnEdit" class="btnEdit" type="button" value="Sửa" />
                        </td>
                        <td>
                            <input id="btnDelete" class="btnDelete" type="button" value="Xóa" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div id="edit-dialog" class="edit-dialog" title="Sửa tin">
        Đưa các control asp.net vào đây để sửa
    </div>
    <div id="delete-dialog" class="delete-dialog" title="Xóa tin">
        Bạn chắc chăn là muốn xóa tin này?
    </div>
</asp:Content>
